//
//  CollectionTableViewCell.m
//  xxShare
//
//  Created by 柳麟喆 on 2018/3/30.
//  Copyright © 2018年 lzLiu. All rights reserved.
//

#import "CollectionTableViewCell.h"

@implementation CollectionTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModel:(FeedModel *)model{
    _model = model;
    _avator.image = [UIImage imageNamed:_model.imageName];
    _name.text = _model.name;
    _time.text = _model.time;
    _postContent.text = _model.postContent;
}

- (void)setFrame:(CGRect)frame
{
    //修改cell的左右边距为10;
    //修改cell的Y值下移10;
    //修改cell的高度减少10;
    
    static CGFloat margin = 10;
    frame.origin.x = margin;
    frame.size.width -= 2 * frame.origin.x;
    frame.origin.y += margin;
    frame.size.height -= margin;
    
    [super setFrame:frame];
}

@end
